<!DOCTYPE html>
<html lang="en">
<!--4月一号以后的installer-->

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />
    <title>Installer Written Statement</title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body,
        div,
        dl,
        dt,
        dd,
        ul,
        ol,
        li,
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        pre,
        code,
        form,
        fieldset,
        legend,
        input,
        texarea,
        p,
        blockquote,
        th,
        td {
            margin: 0px;
            padding: 0px;
        }
        
        body {
            overflow-x: hidden;
            font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
            font-weight: normal;
            line-height: 1.5;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-color: #f8f8f8;
        }
        
        div,
        p {
            word-wrap: break-word;
        }
        
        .text {
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            opacity: 1;
        }
        
        .container {
            padding: 16px;
            background-color: #f8f8f8;
            margin-bottom: 64px;
        }
        
        .textColorTitle {
            color: #b3b7be;
        }
        
        .textColorGreyLight {
            color: #cccccccc;
        }
        
        .textColorGrey {
            color: #999999;
        }
        
        .textColorBlack {
            color: #444444;
        }
        
        .textColorBlackBold {
            color: #444444;
            font-weight: bold;
        }
        
        .greyRadius {
            width: 83px;
            height: 24px;
            background: #8491a3;
            opacity: 1;
            border-radius: 4px 4px 0px 0px;
            color: #ffffff;
            text-align: center;
            margin-top: 14px;
        }
        
        .greyRadius1 {
            width: 93px;
            height: 24px;
            background: #8491a3;
            opacity: 1;
            border-radius: 4px 4px 0px 0px;
            color: #ffffff;
            text-align: center;
            margin-top: 15px;
        }
        
        .line {
            height: 0;
            border-bottom: 0.5px solid #ebebeb;
            opacity: 1;
        }
        
        .marginTop10 {
            margin-top: 10px;
        }
        
        .marginTop4 {
            margin-top: 4px;
        }
        
        .marginTop6 {
            margin-top: 6px;
        }
        
        .serialRight {
            padding-left: 9px;
            flex: 1;
        }
        
        .serialContainer {
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            opacity: 1;
            color: #444444;
            margin-top: 10px;
            display: flex;
            display: -webkit-flex;
        }
        
        .serialBold {
            font-size: 15px;
            font-weight: bold;
            line-height: 20px;
            opacity: 1;
            color: #444444;
            margin-top: 10px;
        }
        
        .serial {
            width: 25px;
        }
        
        .panelNumber {
            height: 110px;
            overflow: scroll;
        }
        
        .paddingLeft6 {
            padding-left: 6px;
        }
        
        #list,
        li {
            margin-top: 10px;
            margin-left: 8px;
        }
        
        input[type="radio"] {
            margin-top: 10px;
        }
        
        .link {
            color: lightblue;
        }
        
        .bottomContainer {
            width: 100%;
            position: fixed;
            bottom: 0;
            background-color: #ffffff;
        }
        
        .textColorRed {
            color: #e41919;
        }
        
        input[type="image"] {
            -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
            -webkit-user-select: none;
            -moz-user-focus: none;
            -moz-user-select: none;
            -webkit-appearance: none;
            outline: none;
            border: none;
        }
        
        a {
            -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
            -webkit-user-select: none;
            -moz-user-focus: none;
            -moz-user-select: none;
            -webkit-appearance: none;
            outline: none;
            border: none;
        }
        
        .li_no_point {
            list-style-type: none;
        }
    </style>
</head>

<body>
    <div>
        <div class="container">
            <p class="text textColorTitle" style="padding-left: 5px;padding-right: 5px;">Please scroll down and read it carefully.If the information provided has been changed on GreenDeal, you'll need to re-sign the statement.</p>
            <div class="card" id="condent">
                <p class="text textColorGrey">
                    I (<span class="text textColorBlackBold" id="input_installer_name">installer name| accreditation number</span>) was the accredited installer and hold the appropriate accreditation type <span class="text textColorBlackBold" id="accreditation_type">(grid connected or stand-alone)</span>                    for the solar PV system installed at <span class="text textColorBlackBold" id="input_install_address">(installation address)</span> and verify that:
                </p>
                <ul class="text textColorGrey" id="list">
                    <li>I complied with the relevant installation requirements of the accreditation scheme under which I am accredited for the installation of the unit
                    </li>
                    <li>All local, State or Territory government requirements have been met for the installation of the unit
                    </li>
                    <li>The electrical wiring associated with the installation of the unit was undertaken by an electrical worker holding an unrestricted licence for electrical work issued by the State or Territory authority for the place where the unit was
                        installed
                    </li>
                    <li>I have provided the owner of the unit with any documents required by the laws of the jurisdiction in which the unit was installed certifying that the installation of the unit complies with the relevant laws relating to safety and technical
                        standards
                    </li>
                    <li>I received a copy of the design of the unit, and<br />
                        <a class="textColorBlack" id="modify">(Please select)</a><br />
                        <form class="textColorBlack" name="modify_form">
                            <label onclick="checkChange1()"><input type="radio" name="modify_type" value="not modified">&nbsp;The
                                    design was not modified during the installation of the unit and it was
                                    installed in all material aspects, in accordance with the design,
                                    or</label>
                            <br />
                            <label onclick="checkChange1()"><input type="radio" name="modify_type" value="modified">&nbsp;The
                                    design was modified during the installation of the unit and the
                                    modifications were consistent with all relevant requirements of the
                                    accreditation scheme for the design of the unit and that the unit was
                                    installed, in all material aspects, in accordance with the modified
                                    design</label><br />
                        </form>
                        <p class="marginTop6">»The unit will perform consistently with the design or modified design (as applicable)</p>
                    </li>
                    <li>That the inverter used in the installation of the unit was an approved eligible model of inverter and if grid-connected complies with AS/NZS 4777.2:2020
                    </li>
                    <li>That the model(s) of PV modules used in the installation of the unit was an approved eligible PV module
                    </li>
                    <li>I was on-site to<br />
                        <a class="textColorBlack" id="duties">(Please select)</a><br />
                        <form class="textColorBlack" name="duties_form">
                            <label onclick="checkChange2()"><input class="redInput" type="radio" name="duties" value="install">&nbsp;Install</label>
                            <br />
                            <label onclick="checkChange2()"><input class="redInput" type="radio" name="duties" value="supervise">&nbsp;Supervise</label><br />
                        </form>
                        <p class="marginTop6">the installation of the unit in accordance with the accreditation scheme under which I am accredited</p>
                    </li>
                    <li>I have and can provide evidence demonstrating that I have met the on-site attendance obligations in accordance with the accreditation scheme under which I am accredited.
                    </li>
                    <li>
                        <ul>That attached to this declaration is a series of photographs showing:
                            <li class="li_no_point" style="margin-left: 10px;">﹥The position of the unit;</li>
                            <li class="li_no_point" style="margin-left: 10px;">﹥The manufacturer(s) and model(s) of the whole unit and its components;</li>
                            <li class="li_no_point" style="margin-left: 10px;">﹥The serial numbers of the unit.</li>
                        </ul>
                    </li>
                    <li>
                        <ul>That attached to this declaration, I further provide:
                            <li class="li_no_point" style="margin-left: 10px;">﹥A copy of all relevant licences and accreditations for this installation;</li>
                            <li class="li_no_point" style="margin-left: 10px;">﹥I agree to this device (the GreenDeal app) taking a photo of me while I sign off to verify my identity.</li>
                        </ul>
                    </li>
                </ul>
                <p class="marginTop10 text textColorGrey">I declare that the above statements are true, correct and complete and understand that under the Renewable Energy (Electricity) Act 2000 and Renewable Energy (Electricity) Regulations 2001 penalties apply for providing false or misleading
                    information. I understand that giving false or misleading information is a serious offence under the Criminal Code Act 1995.</p>
                <!-- <p class="textColorBlack marginTop10">Retailer Witness Confirmation</p>
                    <p class="text textColorGrey">Confirm to also sign as the witness for your retailer.
                    Your signaure will appear on your <a class="link" href="javascript:;"
                    rel="external nofollow"
                    onclick="to_retailer_witness()">Retailer
                    Witness confirm</a> under the witness section.</p> -->
                <p class="marginTop10 textColorBlackBold">
                    I authorise and appoint <span id="agent_name1">(Insert Name of Registered Agent)</span> as my agent to make any updates to this form which are required to allow for it to be duly processed.
                </p>
                <p class="marginTop10 textColorBlackBold">
                I acknowledge that this declaration may be signed by electronic signature using a third-party online document execution service nominated by <span id="agent_name2">(Insert Name of Registered Agent)</span>.  By signing this declaration electronically, I:
                </p>
                <p class="marginTop10 textColorBlackBold">
                • represent and warrant to <span id="agent_name3">(Insert Name of Registered Agent)</span> that I have been duly authorised to sign this declaration electronically, I have affixed my own electronic signature and that I hold the position or title indicated under the electronic signature; and
                </p>
                <p class="marginTop10 textColorBlackBold">
                • indemnify <span id="agent_name4">(Insert Name of Registered Agent)</span> for any liability or loss arising from or in connection with as a result of the abovementioned warranties being untrue.
                </p>
            </div>
        </div>
        <div class="bottomContainer">
            <div class="summitDiv">
                <button type="button" class ="summitButton" onclick="submit()">I Agree & Continue</button>
<!--                <input type="image" src="../images/btn_i_agree_continue.png" style="width: 164px;height: 64px;" onclick="submit()" />-->
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../javascripts/platform.js"></script>
<script language="javascript">
    function checkChange1() {
        var modify = document.getElementById("modify");
        modify.style.color = "#444444";
    }

    function checkChange2() {
        var duty = document.getElementById("duties");
        duty.style.color = "#444444";
    }

    var data;

    function init_pvd_detail(detail) {
        data = detail;
        init_data(data);
        add_input_params(data);
    }

    //传值方法
    function init_data(jsonData) {
        var installer_name = jsonData.signatures.installer_full_name;
        if (jsonData.signatures.installer_accredited_number != null) {
            installer_name = installer_name + " | " + jsonData.signatures.installer_accredited_number;
        }
        let accreditation = "Stand-alone (not connected to an electricity grid)" == jsonData.system_detail.type_of_connection ? "stand-alone" : "grid connected";
        document.getElementById("input_installer_name").innerText = installer_name;
        document.getElementById("accreditation_type").innerText = accreditation;
        document.getElementById("input_install_address").innerText = jsonData.install_address.installation_address;
        document.getElementById("agent_name1").innerText = jsonData.agent_name
        document.getElementById("agent_name2").innerText = jsonData.agent_name
        document.getElementById("agent_name3").innerText = jsonData.agent_name
        document.getElementById("agent_name4").innerText = jsonData.agent_name
    }

    function add_input_params(jsonData) {
        let local = getLocalParam('inputparam');
        local["installation_date"] = jsonData.system_detail.installation_date;
        local["installer_full_name"] = jsonData.signatures.installer_full_name;
        local["installer_accredited_number"] = jsonData.signatures.installer_accredited_number;
        local["type_of_connection"] = jsonData.system_detail.type_of_connection;
        local["installation_address"] = jsonData.install_address.installation_address;
        addParamToLocal('inputparam', local);
    }

    function to_retailer_witness() {
        myJsBridge.skip_to_retailer_witness();
    }

    function submit() {
        var modify = document.getElementById("modify");
        if (modify_form.modify_type.value == "") {
            modify.style.color = "#e41919";
            modify.scrollIntoView();
            return
        } else {
            modify.style.color = "#444444"
        }

        var duty = document.getElementById("duties");
        if (duties_form.duties.value == "") {
            // alert("还没选择duties")
            duty.style.color = "#e41919";
            duty.scrollIntoView();
            return
        } else {
            duty.style.color = "#444444";
        }


        if (isIos) {
            window.webkit.messageHandlers.event.postMessage({
                "event": "capture",
                "key": "installer_agree_selfie"
            });
        }
        if (isAndroid) {
            myJsBridge.capture('installer_agree_selfie');
        }

    }

    function stringNotEmpty(input_string) {
        return input_string != "" && input_string != null && input_string != undefined;
    }

    let doc_version = "3";

    function is_installer_designer_same() {
        return data.is_new_stc_form && data.signatures.installer_accredited_number == data.signatures.designer_accredited_number &&
            (stringNotEmpty(data.signatures.designer_accreditation_type) &&
                data.signatures.designer_accreditation_type.toLowerCase().indexOf("design") != -1);
    }

    function captureSuccess() {
        let localInputParam = getLocalParam('inputparam');
        let local = getLocalParam('param');
        local["design_type"] = modify_form.modify_type.value;
        local["on_site_duties"] = duties_form.duties.value;
        local["statement_input_param_all"] = JSON.stringify(localInputParam);
        local["installer_statement_version"] = doc_version;
        addParamToLocal('param', local);

        if (is_installer_designer_same()) {
            window.location.href = "../designer/designer_index.html"
        } else {
            //客户端需要生成的js方法
            if (isIos) {
                window.webkit.messageHandlers.WebViewEvent.postMessage(local);
            }
            if (isAndroid) {
                myJsBridge.submit(JSON.stringify(local));
            }
        }

    }

    function getLocalParam(paramName) {
        var local = localStorage.getItem(paramName);
        if (local != "" && local != null && local != undefined) {
            console.log(local)
            return JSON.parse(local);
        } else {
            return {};
        }
    }

    function addParamToLocal(paramName, dictionary) {
        localStorage.setItem(paramName, JSON.stringify(dictionary));
    }


    //使用此方法设置值
    //  init_data("张三 034853049", "installer de address","grid connected","四川省成都市天府三街")

    //客户端需要自行生成的方法实现
    //提交事件
    // 1.i_agress_and_sign(String，String)

    //retailer 链接点击事件
    // 2.skip_to_retailer_witness()

    if (isAndroid) {
        let json = myJsBridge.initData();
        init_pvd_detail(JSON.parse(json));
    }

    if (isIos) {
        window.webkit.messageHandlers.event.postMessage({
            "event": "getPvddetail"
        });
    }
</script>

</html>
